<?php

namespace App\Http\Controllers\v3;


/**
 * 用户相关
 * Class CateController
 * @package App\Http\Controllers
 */
class UserController extends Controller {
    /**
     * 登录用户详情
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function user(){
        $openid = request('openid','');
        if(!$openid){
            return $this->returnJson(1,'缺少必要参数！');
        }
        $user = $this->getUser($openid);
        return $this->returnJson(0,'',$user);
    }

    public function test(){
        return $this->returnJson(0,'',['time'=>microtime(true)]);
    }

}
